Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support running with no timeout, ignore/deprecate TIMEOUT task param #2229

Merged
merged 4 commits into from
Jan 7, 2025

Conversation

simonbaird
Copy link
Member

See commits for details.

Ref: https://issues.redhat.com/browse/EC-1030

When running in a Tekton task it's better if Tekton handles the
timeout, so that's why we want to be able to do this.

I decide to skip the context.WithTimeout entirely rather than just
set it to 100 years or whatever.

Ref: https://issues.redhat.com/browse/EC-1030
Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 72.69%. Comparing base (52d753b) to head (73f183e).
Report is 18 commits behind head on main.

Files with missing lines Patch % Lines
cmd/root/root_cmd.go 80.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2229      +/-   ##
==========================================
+ Coverage   72.42%   72.69%   +0.27%     
==========================================
  Files          88       88              
  Lines        7539     7622      +83     
==========================================
+ Hits         5460     5541      +81     
- Misses       2079     2081       +2     
Flag Coverage Δ
generative 72.69% <80.00%> (+0.27%) ⬆️
integration 72.69% <80.00%> (+0.27%) ⬆️
unit 72.69% <80.00%> (+0.27%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
cmd/root/root_cmd.go 51.92% <80.00%> (+1.40%) ⬆️

... and 1 file with indirect coverage changes

cmd/root/root_cmd.go Outdated Show resolved Hide resolved
It's a little more user friendly this way.
@@ -224,7 +226,8 @@ spec:
- "$(params.WORKERS)"
# NOTE: The syntax below is required to negate boolean parameters
- "--info=$(params.INFO)"
- "--timeout=$(params.TIMEOUT)"
# No timeout for EC, though Tekton may apply a timeout
- "--timeout=0"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works quite badly on any version of EC that doesn't have this PR merged. It's probably fine (???), but I was considering using --timeout=100h for a while just to be extra cautious/paranoid.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't release this version of the task without the new version of EC

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I was wondering about the roll-out process. See this slack thread where @lcarva shared a doc that describes the details.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decided to be cautious. See new top commit.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The official Task bundle is always built to use the latest EC CLI at the time (via OCI tag to a specific git commit ID). Also, updates to Konflux are always driven from Task updates. In other words, new CLI images are used indirectly via a new Task bundle. However, I agree with the general instance of being cautious with the change.

Ignore the TIMEOUT param. Mention in the param description that it's
now ignored and deprecated.

Ref: https://issues.redhat.com/browse/EC-1030
The commentary explains the reasoning.

It's not expected to be an issue for Konflux, but theoretically
RHTAP users might have an older EC base image and could some day
migrate to this task definition which would break the task.

Decided to keep the commit separate rather than squash so we can
easily revert it some day.

Ref: https://issues.redhat.com/browse/EC-1030
@simonbaird simonbaird merged commit 1f2699f into enterprise-contract:main Jan 7, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants